
<head>
<meta charset="utf-8">
<title>demo</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<style>
 .slider-box{ background:#FEFEFE; font-family:Microsoft Yahei; padding-bottom:10px}
 .slider-box .item{ padding:10px}
 .slider-box .item .tag, .slider-box .item .slider, .slider-box .item .val{ float:left; margin-right:18px}
 .slider-box .item .slider{ width:400px}
 .slider-box .item .slider div{ background:#3498db; border:none; height:1.3em; margin-top:0em}
 .slider-box .item .slider div .ui-slider-handle{ background:#ecf0f1; width:1em; height:1.8em; border-radius:10em}
 .slider-box .item .val input{ border:none; border-bottom:0.5px solid #ABADA8; background:none; padding:0.1em 1em; color:#34495e; font-weight:bold; font-size:1.2em; width:5em; text-align:center}
 .clr{ clear:both}
</style>
</head>











<%= form_for(@p_entry) do |f| %>
  <% if @p_entry.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@p_entry.errors.count, "error") %> prohibited this p_entry from being saved:</h2>

      <ul>
      <% @p_entry.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>



  

  <div class="field">
    <%= f.label "Pivotal Tracker #"%>
    <br>
    <%= f.number_field :ptracker,options = {:style=>'width:300px;height:30px;'} %>
  </div>


  <div class="field">
    <%= f.label :note %><br>
    <%= f.text_area :note ,options = {:style=>'width:300px;height:40px;',:placeholder => "Leave some notes"} %>
  </div>

 <div class="field">
   <div class="slider-box">
     <div class="item">
       <div class="tag">Progress：</div>
       <div class="slider">
        <div id="status"></div>
       </div>
       <div class="val"><input value="50" name="p_entry[status]" /></div>
      </div>
      <div class="clr"></div>
    </div>
  </div>
 


  <div class="actions">
    <input name="commit" type="submit" value="Sumbit" class="btn btn-info"/>
  </div>


 <script>
$( document ).ready(function() {
 $("#status").slider({
   min: 0,
   max: 100,
   step: 1,
   value: $('input[name="p_entry[status]"]').val(),
   slide: function( event, ui ) {
    $('input[name="p_entry[status]"]').val(ui.value)
   }
  });
 });
 </script>

<% end %>